<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>融易拍</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="/static/wx/lib/sui/sm.min.css">
    <link rel="stylesheet" href="/static/wx/lib/sui/sm-extend.min.css">

    <link rel="stylesheet" href="/static/wx/css/reset.css">
    <link rel="stylesheet" href="/static/wx/css/main.css">
    <link rel="stylesheet" href="/static/wx/css/public_main.css">
</head>

<body>
    <div class="page-group">
        <div class="page page-current" id="home">
            <!-- 标题栏 -->
            <!-- <header class="bar bar-nav"> -->
                <!-- <a class="icon pull-left">
                    <img src="imgs/icon/left.png" width="15" height="25">
                </a> -->
                <!-- <h1 class="title">融易拍</h1> -->
            <!-- </header> -->
            <!--工具栏-->
            <nav class="bar bar-tab">
                <a class="tab-item external active" href="{:url('index/index')}">
                    <img class="icon" src="/static/wx/imgs/img/home_active.png">
                    <span class="tab-label">首页</span>
                </a>
                {if ($userInfo.role_id != 4)}
                    {if($userInfo.role_id == 3)}
                        <a class="tab-item external"   href="{:url('insurant/protectList')}" >
                        <img class="icon" src="/static/wx/imgs/img/check.png">
                        <span class="tab-label">核对资料</span>
                        </a>
                    {else /}
                        <a class="tab-item external"  {if ($userInfo.role_id == 2)} href="{:url('Recordor/getByme')}" {else /} href="{:url('insurer/step1')}" {/if}>
                            <img class="icon" src="/static/wx/imgs/img/check.png">
                            <span class="tab-label">录入</span>
                        </a>
                    {/if}

                    <a class="tab-item external" href="{:url('message/getMessList')}">
                        <img class="icon" src="/static/wx/imgs/img/message.png">
                        <span class="tab-label">消息</span>
                        <span class="badge"></span>
                    </a>
                {/if}
                <a class="tab-item external" href="{:url('User/person')}">
                    <img class="icon" src="/static/wx/imgs/icon/mine.png">
                    <span class="tab-label">我的</span>
                </a>
            </nav>
            <!-- 主内容 -->
            <div class="content">
                <div class="avator-box">
                    <div class="avator-inner">
                        <div class="avator">
                            <img src="{$userInfo.head_img}">
                        </div>
                        <p class="avator-name size-n">{$userInfo.username}</p>
                        <p class="avator-company size-m">{$userInfo.role_name}</p>
                    </div>
                </div>
                {if ($userInfo.role_id != 4)}

                <div class="row menu-box">
                    <!--保险人-->
                    {if ($userInfo.role_id == 1)}
                    <div class="col-33 menu-item"  onclick="location.href='/wx/insurer/step1';">
                        <img src="/static/wx/imgs/img/bao_in.png">
                        <p class="size-65">保险录入</p>
                    </div>
                    <div class="col-33 menu-item" onclick="location.href='/wx/insurer/otherInsurer';">
                        <img src="/static/wx/imgs/img/other_in.png" >
                        <p class="size-65">他人代录</p>
                    </div>
                    <div class="col-33 menu-item" onclick="location.href='/wx/insurer/otherList';">
                        <img src="/static/wx/imgs/img/other_name_list.png">
                        <p class="size-65">代录人名单</p>
                    </div>
                    <div class="col-33 menu-item" onclick="location.href='/wx/insurer/getList';">
                        <img src="/static/wx/imgs/img/history.png">
                        <p class="size-65">历史资料</p>
                    </div>
                    <div class="col-33 menu-item" onclick="location.href='/wx/index/newHand';">
                        <img src="/static/wx/imgs/img/new_hand.png">
                        <p class="size-65">新手教程</p>
                    </div>
                    <div class="col-33 menu-item" onclick="location.href='/wx/insurer/authList';">
                        <img src="/static/wx/imgs/img/print.png">
                        <p class="size-65">打印授权书</p>
                    </div>
                    {/if}
                    <!--代录人 保险公司待录  已录资料 新手教程-->
                    {if ($userInfo.role_id == 2)}
                    <div class="col-33 menu-item"  id="ready_recorder" onclick="location.href = '/wx/recordor/getByme';">
                        <img src="/static/wx/imgs/img/company.png">
                        <p class="size-65">保险公司待录</p>
                    </div>
                    <div class="col-33 menu-item" id="getList" onclick="location.href = '/wx/recordor/alreadyList';">
                        <img src="/static/wx/imgs/img/history_file.png">
                        <p class="size-65">已录资料</p>
                    </div>
                    <div class="col-33 menu-item"  onclick="location.href='/wx/index/newHand';">
                        <img src="/static/wx/imgs/img/new_hand.png">
                        <p class="size-65">新手教程</p>
                    </div>
                    {/if}
                    <!--被保险人 核对资料  历史资料 新手教程 打印委托书 下载提货单 上传提货单-->
                    {if ($userInfo.role_id == 3)}
                    <div class="col-33 menu-item" id="protectList">
                        <img src="/static/wx/imgs/img/check_file.png">
                        <p class="size-65">核对资料</p>
                    </div>
                    <div class="col-33 menu-item" id="historyInfo">
                        <img src="/static/wx/imgs/img/history.png">
                        <p class="size-65">历史资料</p>
                    </div>
                    <div class="col-33 menu-item"  onclick="location.href='/wx/index/newHand';">
                        <img src="/static/wx/imgs/img/new_hand.png">
                        <p class="size-65">新手教程</p>
                    </div>
                    <div class="col-33 menu-item" id="print_report">
                        <img src="/static/wx/imgs/img/print_auth_book.png">
                        <p class="size-65">打印委托书</p>
                    </div>
                    <div class="col-33 menu-item" id="download_bol">
                        <img src="/static/wx/imgs/img/download_sheet.png">
                        <p class="size-65">下载提货单</p>
                    </div>
                    <div class="col-33 menu-item" id="upload_bol">
                        <img src="/static/wx/imgs/img/upload_sheet.png">
                        <p class="size-65">上传提货单</p>
                    </div>
                    {/if}
                </div>
                {/if}


            </div>


            </div>
        </div>

    </div>

    <script type='text/javascript' src='/static/wx/lib/sui/zepto.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm-extend.min.js' charset='utf-8'></script>
    <!--<script type='text/javascript' src="/static/wx/lib/sui/jquery.js"></script>-->
    <script>
        function checkMsg(){
            var html = '';
            $.ajax({
                url:'/wx/index/check_msg',
                type:'post',
                dataType:'json',
                data:{},
                success:function (data) {
                    if(data.code ==200){
                        if(data.data > 0){
                            html = data.data;
                        }else{
                            html = '暂无';
                        }
                        $('.badge').html(html);
                    }else{
                        $.alert(data.msg);
                    }
                }
            });
        }
        setInterval('checkMsg()',2000);



        // 被保险人路由
        $('#protectList').on('touchend',function(){
            window.location.href = '/wx/Insurant/protectList';
        });
        $('#print_report').on('touchend',function(){
            window.location.href = '/wx/Insurant/print_report';
        });
        $('#download_bol').on('touchend',function(){
            window.location.href = '/wx/Insurant/download_bol';
        });
        $('#upload_bol').on('touchend',function(){
            window.location.href = '/wx/Insurant/upload_bol';
        });
        $('#historyInfo').on('touchend',function(){
            window.location.href = '/wx/Insurant/historyInfo';
        });
        //保险人员




        //代录人
        // $('#ready_recorder').on('touchend',function(){
        //     window.location.href = '/wx/Recordor/getByme';
        // });
        // $('#getList').on('touchend',function(){
        //     window.location.href = '/wx/Recordor/alreadyList';
        // });
        // $('#getList').on('touchend',function(){
        //     window.location.href = '/wx/Recordor/alreadyList';
        // });




    </script>
</body>

</html>